.class Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;
.super Landroid/os/AsyncTask;
.source "PreferencesActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/noshufou/android/su/preferences/PreferencesActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "RestoreApps"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        "Ljava/lang/Integer;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;


# direct methods
.method private constructor <init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 451
    iput-object p1, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 451
    invoke-direct {p0, p1}, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;-><init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;)V

    return-void
.end method


# virtual methods
.method protected varargs doInBackground([Ljava/lang/Void;)Ljava/lang/Integer;
    .locals 1
    .parameter "params"

    .prologue
    .line 460
    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    invoke-static {v0}, Lcom/noshufou/android/su/util/BackupUtil;->restoreBackup(Landroid/content/Context;)I

    move-result v0

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    return-object v0
.end method

.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->doInBackground([Ljava/lang/Void;)Ljava/lang/Integer;

    move-result-object v0

    return-object v0
.end method

.method protected onPostExecute(Ljava/lang/Integer;)V
    .locals 7
    .parameter "result"

    .prologue
    const/4 v6, 0x0

    .line 465
    iget-object v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    const v3, 0x7f0a0010

    invoke-virtual {v2, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ProgressBar;

    const/16 v3, 0x8

    invoke-virtual {v2, v3}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 466
    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result v2

    const/4 v3, -0x1

    if-le v2, v3, :cond_0

    .line 467
    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result v2

    if-lez v2, :cond_1

    .line 468
    iget-object v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    invoke-virtual {v2}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const/high16 v3, 0x7f0c

    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result v4

    const/4 v5, 0x1

    new-array v5, v5, [Ljava/lang/Object;

    aput-object p1, v5, v6

    invoke-virtual {v2, v3, v4, v5}, Landroid/content/res/Resources;->getQuantityString(II[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    .line 470
    .local v1, message:Ljava/lang/String;
    :goto_0
    iget-object v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    invoke-virtual {v2}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    invoke-static {v2, v1, v6}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v2

    .line 472
    invoke-virtual {v2}, Landroid/widget/Toast;->show()V

    .line 473
    iget-object v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    invoke-virtual {v2}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    .line 474
    .local v0, intent:Landroid/content/Intent;
    iget-object v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    invoke-virtual {v2}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->finish()V

    .line 475
    iget-object v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    invoke-virtual {v2, v0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->startActivity(Landroid/content/Intent;)V

    .line 477
    .end local v0           #intent:Landroid/content/Intent;
    .end local v1           #message:Ljava/lang/String;
    :cond_0
    return-void

    .line 469
    :cond_1
    iget-object v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    const v3, 0x7f0b0077

    invoke-virtual {v2, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    goto :goto_0
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    check-cast p1, Ljava/lang/Integer;

    invoke-virtual {p0, p1}, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->onPostExecute(Ljava/lang/Integer;)V

    return-void
.end method

.method protected onPreExecute()V
    .locals 2

    .prologue
    .line 455
    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$RestoreApps;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    const v1, 0x7f0a0010

    invoke-virtual {v0, v1}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ProgressBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 456
    return-void
.end method
